﻿@model Google.GData.Client.Feed<Google.YouTube.Video>
<ul class="relatedList">
   

    @foreach (var item in Model.Entries)
    {   
        if (item.Thumbnails.Count > 0)
        {
        <li><a class="relatedVideoLink" href="@Url.Action("Show", new { id = @item.VideoId })"
        title="@item.Title">
            <img src="@item.Thumbnails[0].Url" alt="@item.Title"/>
        </a>
            <div class="relatedVideoInfo">
                @if (item.Title != string.Empty)
                { 
                    <span class="title">@Html.ActionLink(@item.Title, "Show", new { id = @item.VideoId })</span>  
                }
                else
                {
                    <span class="title">@Html.ActionLink(@item.VideoId, "Show", new { id = @item.VideoId })</span>
                }
                <span class="author">by @Html.ActionLink(item.Author, "ShowLists", new { id = item.Author })</span>
                <span class="views">@item.ViewCount.ToString("###,###") views</span>
            </div>
        </li>
        }
    }
</ul>
